<include file="__THEME__/header" />
<link href="../Public/css/blog.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/js/jquery-admin-box.js">
</script>
<script type="text/javascript" src="__PUBLIC__/js/thickbox/jquery.mousewheel.min.js" charset="utf-8">
</script>
<script>
	
        $(function(){
        	$.fn.admin({
        		prefix:'blog_',
        		checkClass:'blog_admin_check',
        		hiddenId:'blogAdminBox',
    			type:false,
        	});
        });
    	var url = '{:U('home/blog/deleteBlog')}';
        function deleteAllBlog(){
    		$.tbox.confirm("{:L('blogList_0004')}", "{:L('blogList_0008')}", {
            	ok: "doDeleteBlog",
        	});
    	}
    	
    	function doDeleteBlog(){
    		var blogId = $.fn.getData('blog_');
    		$.post(url,{id:blogId},function(result){
    			result = eval('('+result+')');
    			
    			if(result.status == 1){
    				location.reload();
    			}else{
    				    $.tbox.no(result.info, "{:L('blogList_0007')}");
                		setTimeout("$.tbox.close()", 1500);
    			}
    		})
    	}
		
		function downAllDigOrder(){
    		$.tbox.confirm("{:L('blogList_0000')}", "{:L('blogList_0008')}", {
            	ok: "doDownDigOrder",
        	});
    	}
    	
    	function doDownDigOrder(){
			var downUrl = '{:U('home/blog/downDigOrder')}';
    		var blogId = $.fn.getData('blog_');
    		$.post(downUrl,{id:blogId},function(result){
    			result = eval('('+result+')');
    			
    			if(result.status == 1){
    				location.reload();
    			}else{
    				    $.tbox.no(result.info, "{:L('blogList_0007')}");
                		setTimeout("$.tbox.close()", 1500);
    			}
    		})
    	}
		
		
		function upAllDigOrder(){
    		$.tbox.confirm("{:L('blogList_0001')}", "{:L('blogList_0008')}", {
            	ok: "doUpDigOrder",
        	});
    	}
    	
    	function doUpDigOrder(){
			var downUrl = '{:U('home/blog/upDigOrder')}';
    		var blogId = $.fn.getData('blog_');
    		$.post(downUrl,{id:blogId},function(result){
    			result = eval('('+result+')');
    			
    			if(result.status == 1){
    				location.reload();
    			}else{
    				    $.tbox.no(result.info, "{:L('blogList_0007')}");
                		setTimeout("$.tbox.close()", 1500);
    			}
    		})
    	}
    	
</script>
<div class="contents lbg B">
    <!-- --左边信息 begin--------><include file="../Public/left" />
    <div class="contents_min w668">
        <div class="blog_inde_cont">
            <h3 class="tit_h3">{$uid|getUserName}{:L('blogList_0010')}</h3>
            <volist name="data" id="vo">
                <dl class="list_dl">
                    <dt>
                        <php>
                            if($admin){
                        </php>
                        <span class="R f12 fn">
                            <label>
                                <input class="in_r blog_admin_check" type="checkbox" rel="0,1,2" dataId="{$vo.blogId}"/>{:L('blogList_0014')}
                            </label>
                        </span>
                        <php>
                            }
                        </php>
                        <a  target="_blank" href="{:U('blog/index/detail','id='.$vo['blogId'].'&uid='.$vo['uid'])}">{$vo.title}</a>
                    </dt>
                    <dd class="min_h">
                        <php>
                            if(!empty($vo['cover'])){
                        </php>
                        <a href="{$vo.cover}" title="{$vo.title}" class="thickbox"><img width="160" height="120" src="{$vo.cover}" alt="{$vo.title}" /></a>
                        <php>
                            }
                        </php>
                        {$vo.content}
                        <div class="C">
                        </div>
                    </dd>
                    <dd class="option2">
                    <span>{:L('blogList_0009')} {$vo.cTime|friendlyDate} </span>| <span><a href="{:U('blog/index/detail','id='.$vo['blogId'].'&uid='.$vo['uid'])}#comment">{:L('blogList_0013')}( {$vo.commentCount} )</a></span>| <span><a href="{:U('blog/index/detail','id='.$vo['blogId'].'&uid='.$vo['uid'])}">{:L('blogList_0012')}( {$vo.readCount} )</a></span>
                   </dd>
                </dl>
            </volist>
        </div>
        <div class="page mb20 alR mt5">{$html}</div>
    </div>
    <include file="right" /><!-- --中间信息 begin-------->
    <div class="C"></div>
</div>
<include file="__THEME__/footer" />
<div id="blogAdminBox" style="display:none;">
	<a href="javascript:void(0)" onclick="downAllDigOrder('{:U('home/blog/downDigOrder')}')">{:L('blogList_0002')}</a>
	<a href="javascript:void(0)" onclick="upAllDigOrder('{:U('home/blog/upDigOrder')}')">{:L('blogList_0003')}</a>
	<a href="javascript:void(0)" onclick="deleteAllBlog();">{:L("blogList_0011")}</a>
</div>
